Conversation
…ilures Root cause of the invisible goal stall: the afterIdle evaluation died on a typed NotFoundError from the messages-window read (session row gone mid-goal, or a synthetic session), and the fork's bare Effect.ignore swallowed it — goal left permanently active, turns_used frozen at 0, zero logs. - afterIdle + zombie probe + post-judge reload: NotFoundError on any of the three messages windows degrades to an empty window (MessageV2.stream pattern) so the existing visible branches handle it (pause / continuation) - triggerEvaluation fork: Effect.ignore -> catchCause + logWarning (interrupts stay silent per F1) so future evaluation failures are diagnosable - judge chain: orElseSucceed -> catchCause so DEFECTS in the production provider chain (config orDie, payload decode) fold into the parseFailed budget instead of silently killing the evaluation - auto-pause transcript line: ignore -> catchCause + logWarning (symmetric with the done branch) - P2-B comment corrected: effect v4 Effect.ignore absorbs defects too; catchCause's value here is diagnosability, not subscription survival - regression tests: production-wiring probe (bootstrap-wiring.test.ts), pre-judge window pause, post-judge reload tolerance (GOAL-FP-01-18), judge-defect budget degradation (GOAL-FP-01-18b) - lint: new code is warning-neutral; drop 11 pre-existing unused imports to restore gate margin (oxlint ratchet, local 4846 -> 4829)
fix(goal): tolerate vanished-session message windows, surface loop failures
A transient DB failure during pauseForUserCancel would silently lose the pause: the turnDriven mark cleared, the pause never persisted, and the next idle event resurrected the goal against the user's explicit ESC (shouldPreempt cannot catch ESC — it adds no user message). Retry the pause up to twice with 50ms backoff (Effect.exit captures defects, unlike typed retry); on exhausted retries log loudly instead of warning, so a resurrecting goal is never invisible. No clean fault-injection seam for the retry branch (test DB is :memory:, pauseAndPublish is a layer closure over drizzle orDie) — happy path covered by test/goal/turn-scope.test.ts; seam absence recorded per diagnosis policy.
fix(goal): retry ESC pause persistence before giving up the goal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
合并 dev 到 main,包含 goal-loop 静默卡死的止血修复:
#283 fix(goal): tolerate vanished-session message windows, surface loop failures
Effect.ignore吞掉 → goal 永久 active、turns_used 恒 0、零日志(生产事故同形)Effect.ignore→catchCause + logWarning(interrupt 保持静默,F1 纪律)orElseSucceed→catchCause:provider 链 defect 并入 parseFailed 预算而非静默杀死评估Effect.ignore实际吸收 defect)#284 fix(goal): retry ESC pause persistence before giving up the goal
Effect.exit覆盖 defect),用尽后logError高亮验证:两 PR 独立通过 dev 门禁(Typecheck + CodeQL);test/goal 103 pass + 生产装配探针 GREEN;请 main 全量门禁(Typecheck + Unit Tests linux + E2E linux/windows)复核。
遗留已立 issue(不阻塞发布):#285(崩溃重启轮数通胀,需 durable 边界设计)、#286(HookCommand 静默丢弃字段)。